# Lombo Asoc platform Support
obj-$(CONFIG_SND_SOC_N7V1_I2S0) += lombo_i2s_n7.o
obj-$(CONFIG_SND_SOC_N7V1_I2S1) += lombo_i2s_n7.o
obj-$(CONFIG_SND_SOC_LOMBO) += lombo_dmaengine.o
obj-$(CONFIG_SND_SOC_LOMBO_AUDIO_DAI) += lombo_audio_dai.o
obj-$(CONFIG_SND_SOC_LOMBO_I2S) += lombo_i2s.o

ifeq ($(CONFIG_ARCH_LOMBO_N7V1), y)
CSP_PLATFORM := n7v1
else
CSP_PLATFORM := n9v1
endif

I2S_SOURCE := $(srctree)/$(src)/csp/$(CSP_PLATFORM)/i2s/*.c
ifneq ($(wildcard $(I2S_SOURCE)), )
obj-$(CONFIG_SND_SOC_LOMBO) += csp/$(CSP_PLATFORM)/i2s/
else
obj-y += liblombo_i2s.o
$(obj)/liblombo_i2s.o: $(src)/csp/$(CSP_PLATFORM)/i2s/liblombo_i2s
	cp $< $@
endif

AC_SOURCE := $(srctree)/$(src)/csp/$(CSP_PLATFORM)/ac/*.c
ifneq ($(wildcard $(AC_SOURCE)), )
obj-$(CONFIG_SND_SOC_LOMBO) += csp/$(CSP_PLATFORM)/ac/
else
obj-y += liblombo_ac.o
$(obj)/liblombo_ac.o: $(src)/csp/$(CSP_PLATFORM)/ac/liblombo_ac
	cp $< $@
endif

ifneq ($(CONFIG_ARCH_LOMBO_N7V1), y)
PDM_SOURCE := $(srctree)/$(src)/csp/$(CSP_PLATFORM)/pdm/*.c
ifneq ($(wildcard $(PDM_SOURCE)), )
obj-$(CONFIG_SND_SOC_LOMBO_PDM) += csp/$(CSP_PLATFORM)/pdm/
else
obj-y += liblombo_pdm.o
$(obj)/liblombo_pdm.o: $(src)/csp/$(CSP_PLATFORM)/pdm/liblombo_pdm
	cp $< $@
endif
endif

ifeq ($(CONFIG_ARCH_LOMBO_N7V3), y)
obj-y += n7v3-dmaengine-pcm.o
endif

# n7 and n7v1 codec
obj-$(CONFIG_SND_SOC_LOMBO_N7CODEC) += n7_codec.o
obj-$(CONFIG_SND_SOC_LOMBO_N7CODEC) += lombo_n7.o
# n7v3, n7v5 and n9 codec
obj-$(CONFIG_SND_SOC_LOMBO_CODEC) += lombo_codec.o
# n7v3, n7v5 and n9 pdm
obj-$(CONFIG_SND_SOC_LOMBO_PDM) += lombo_pdm.o
obj-$(CONFIG_SND_SOC_LOMBO_PDM) += lombo_dmic.o
# N9 platform
obj-$(CONFIG_SND_SOC_LOMBO_N9) += lombo_n9.o
# N7V3 platform
obj-$(CONFIG_SND_SOC_LOMBO_N7V3) += lombo_n7v3.o
# N7V5 platform
obj-$(CONFIG_SND_SOC_LOMBO_N7V5) += lombo_n7v5.o
# dummy codec and platform for test
obj-$(CONFIG_SND_SOC_LOMBO_DUMMY) += dummy_codec.o
obj-$(CONFIG_SND_SOC_LOMBO_DUMMY) += lombo_dummy.o